-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide buttons on smaller screens (mobile). #141
Conversation
See jupyterlite#140, we might want to also add a warning dialog from Javascript as well in a subsequent PR.
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put this behind a jupyterlite-sphinx flag?
I don't think we should this can always be overridden with custom css, the same way we can change the buttons colors or position on the page. |
Ok, sounds good! |
@martinRenou After this gets in, can we do a new release? Update: Actually, I think there's one more thing I'd like to see go in first. An option to put a warning cell at the top of the generated notebooks in the |
Sure thing! You should have the rights to make releases. Feel free to make it if you want! To do this you need to go at the |
Thanks @martinRenou! That's very convenient. I'll make one after things get settled. |
@Carreau, could we use javascript to conditionally hide the button based on the area of the screen? Or would it be better just to use plain css and hide based on max-width and max-height? Also, should we take tablets into account? |
Often tablets will be used in school/university settings where it would be helpful to be able to try the code. It is a shame there is no "low data connection" indicator, this seems like it should be a solved problem. |
Is it possible to, instead of tinkering with screen sizes, retrieve at the device settings and warn users with a pop-up / differently-coloured |
@Carreau mentioned navigator.connection here which should work in principle, but isn't available on ios safari.. It seems like they don't want to implement it because of privacy concerns. This issue, https://bugs.webkit.org/show_bug.cgi?id=185697, has been open for almost 6 years now. |
Not sure. I think the issue of having a pop-up or changing the color of the button is orthogonal to detecting if we're dealing with a device using mobile data. @Carreau mentioned adding a warning dialogue with javascript, so I think that is the plan eventually. I don't know much about web dev, so I'm not sure what you mean by retrieving at the device settings. Based on the research I've done this morning, I think the only things we have to go on are the user agent, screen width, screen height, and on some platforms |
Co-authored-by: Albert Steppi <[email protected]>
we can likely implement a dialog we a "don't ask me again", and tweak the logic of when to show it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works correctly on my phone now. Just needs some comments updated in response to the 430px to 480px change.
Co-authored-by: Albert Steppi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@martinRenou, it seems like I might not have the right permissions to make a release. I tried running the
|
@steppi can you try again? |
It worked this time. Thanks! |
@martinRenou, I just selected the default options, which prepared release |
Right, you can remove the release draft in https://github.com/jupyterlite/jupyterlite-sphinx/releases. Then I believe you can rerun with the version specifier "minor". |
Yay!! Thanks for the release!! |
See #140, we might want to also add a warning dialog from Javascript as well in a subsequent PR.